
import request from "@/utils/request";

//用工需求管理列表
export function getOperationalList(query) {
  return request({
    url: '/operationalApi/operationalList',
    method: 'get',
    params: query
  })
}
//用工需求 新增 需求单号
export function getOrderCode() {
  return request({
    url: '/operationalApi/getOrderCode',
    method: 'get',
  })
}

//用工需求 新增
export function operationalAdd(data) {
  return request({
    url: '/operationalApi/operationalAdd',
    method: 'post',
    data: data
  })
}
//用工需求 编辑
export function operationalUpdate(data) {
  return request({
    url: '/operationalApi/operationalUpdate',
    method: 'post',
    data: data
  })
}
//用工需求 撤销
export function delProcessInstance(data) {
  return request({
    url: '/task/delProcessInstance',
    method: 'post',
    data: data
  })
}

// 用工需求 详情
export function getOperationalDetail(id) {
  return request({
    url: '/operationalApi/'+id,
    method: 'get'
  })
}

// 用工需求 删除
export function operationalDelete(id) {
  return request({
    url: '/operationalApi/delete/'+id,
    method: 'post'
  })
}

//用工需求管理 方案获取
export function getFaResult(query) {
  return request({
    url: '/operationalApi/getFaResult',
    method: 'get',
    params: query
  })
}
//用工需求管理 排班数量
export function getWorkerNumber(query) {
  return request({
    url: '/operationalApi/getWorkerNumber',
    method: 'get',
    params: query
  })
}
//用工需求管理 考勤数据
export function getAttendanceInformation(query) {
  return request({
    url: '/operationalApi/getAttendanceInformation',
    method: 'get',
    params: query
  })
}

// 获取班次列表
export function getTimShiftInfo(query) {
  return request({
    url: '/operationalApi/getTimShiftInfo',
    method: 'get',
    params: query
  })
}

// 获取 班次列表 和班组
export function getTimeShiftAndDep(query) {
  return request({
    url: '/operationalApi/getTimeShiftAndDep',
    method: 'get',
    params: query
  })
}
